import request from '@/utils/request'

export function treeSelectPoint(query) {
  return request({
    url: '/basic/protree/treeSelectPoint',
    method: 'get',
    params: query
  })
}

export function protreeTreeSelect() {
  return request({
    url: '/basic/protree/protreeTreeSelect',
    method: 'get'
  })
}

export function listProtreeExcludeChild(id) {
  return request({
    url: '/basic/protree/list/exclude/' + id,
    method: 'get'
  })
}
export function listProtreeObtainChild(id) {
  return request({
    url: '/basic/protree/list/obtain/' + id,
    method: 'get'
  })
}
// 查询项目树配置列表
export function listProtree(query) {
  return request({
    url: '/basic/protree/list',
    method: 'get',
    params: query
  })
}

// 查询项目树配置详细
export function getProtree(id) {
  return request({
    url: '/basic/protree/' + id,
    method: 'get'
  })
}

// 新增项目树配置
export function addProtree(data) {
  return request({
    url: '/basic/protree',
    method: 'post',
    data: data
  })
}

// 修改项目树配置
export function updateProtree(data) {
  return request({
    url: '/basic/protree',
    method: 'put',
    data: data
  })
}

// 删除项目树配置
export function delProtree(id) {
  return request({
    url: '/basic/protree/' + id,
    method: 'delete'
  })
}

// 导出项目树配置
export function exportProtree(query) {
  return request({
    url: '/basic/protree/export',
    method: 'get',
    params: query
  })
}
